package org.edu.service.impl;

import java.util.List;

import javax.faces.model.SelectItem;

import org.edu.dao.TeacherLessonDao;
import org.edu.model.TeacherLesson;
import org.edu.service.TeacherLessonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service("teacherLessonService")
public class TeacherLessonServiceImpl implements TeacherLessonService {

	@Autowired
	private TeacherLessonDao teacherLessonDao;
	public TeacherLessonServiceImpl() {
		// TODO Auto-generated constructor stub
	}

	@Transactional
	public void save(TeacherLesson teacherLesson) throws Exception {
		teacherLessonDao.save(teacherLesson);
	}

	@Transactional
	public void update(TeacherLesson teacherLesson) throws Exception {
		teacherLessonDao.update(teacherLesson);
	}

	@Transactional
	public void remove(TeacherLesson teacherLesson) throws Exception {
		teacherLessonDao.remove(teacherLesson);
	}

	@Transactional
	public List<TeacherLesson> teacherLessons() {
		return teacherLessonDao.teacherLessons();
	}

	@Transactional
	public TeacherLesson findById(Long teacher_lesson_id) throws Exception {
		return teacherLessonDao.findById(teacher_lesson_id);
	}

	@Transactional
	public List<SelectItem> selectItems() {
		return teacherLessonDao.selectItems();
	}

}
